<%@ page language="java" import="java.util.*,com.superteam.mac.servlet.ReceiveData,com.superteam.mac.mode.RealTimeBean" pageEncoding="UTF-8"%>
<%
	List<Map<String,List<RealTimeBean>>> ds = ReceiveData.datas;
	List<RealTimeBean> allbeans = new ArrayList<RealTimeBean>();
		for(Map<String,List<RealTimeBean>> map : ds)
		{
			for(java.util.Iterator<String> iter = map.keySet().iterator();iter.hasNext();)
			{
				String key = iter.next();
				allbeans.addAll(map.get(key));
			}
			
		}
		if(allbeans.size()==0){out.println("&label=0&value=0|0");return;}
		//倒序。。。
		Collections.reverse(allbeans);
		
		String machine = (String)session.getAttribute("real_line_cur_machine");		
		String workshop = (String)session.getAttribute("real_line_cur_workshop");
		String cuconfig = (String)session.getAttribute("real_line_cur_config");
		
		System.out.println("machine="+machine+"==workshop="+workshop+"==cuconfig"+cuconfig+"==");
		
		if(machine == null&&workshop == null)
		{
			out.println("&label="+allbeans.get(0).getTime()+"&value="+allbeans.get(0).getConfigVal()+"|67");
			
		}else{
			if(null!=machine){
				for(RealTimeBean b:allbeans)
					{
						if(machine.equals(b.getMachineName())&&(b.getIndexConfig().equals(cuconfig))){
							out.println("&label="+b.getTime()+"&value="+b.getConfigVal()+"|67");
							System.out.println("+++machine="+b.getMachineName()+"==workshop="+b.getWorkShopName()+"==cuconfig"+b.getIndexConfig()+"==");
	
							break;
						}
					}
			}else{
				for(RealTimeBean b:allbeans)
					{
						if(workshop.equals(b.getWorkShopName())&&(b.getIndexConfig().equals(cuconfig))){
							out.println("&label="+b.getTime()+"&value="+b.getConfigVal()+"|67");
							System.out.println("=====machine="+b.getMachineName()+"==workshop="+b.getWorkShopName()+"==cuconfig"+b.getIndexConfig()+"==");
	
							break;
						}
					}
			}
		}
	
 %>

